import scrapy
from .base import *

__all__ = ['EleBusItem']


# 区域经济
class EleBusItem(BaseItem):
    title = scrapy.Field()  # 商品标题
    spu_id = scrapy.Field()  # 商品spu_id
    brand = scrapy.Field()  # 品牌
    category = scrapy.Field()  # 品类
    sex = scrapy.Field()  # 性别
    atlas = scrapy.Field()  # 图集
    cost_price = scrapy.Field()  # 成本价
    retail_price = scrapy.Field()  # 工价
    currency = scrapy.Field()  # 货币单位
    detail_url = scrapy.Field()  # 商品详情页链接
    specifications = scrapy.Field()  # 规格(商品尺寸或者服装尺码表)
    size_stock = scrapy.Field()  # 尺码&库存
    color = scrapy.Field()  # 颜色
    composition = scrapy.Field()  # 成分
    product_des = scrapy.Field()  # 商品描述
    md5_value = scrapy.Field(type=str)  # MD5唯一值入库去重

    def __init__(self):
        super().__init__()
        self['type'] = 'ele_bus'
